Optimal. Leaf size=51 \[ -\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {2 \sqrt {a+b \sec (c+d x)}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3970, 52, 65,
213} \begin {gather*} \frac {2 \sqrt {a+b \sec (c+d x)}}{d}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 213
Rule 3970
Rubi steps
\begin {align*} \int \sqrt {a+b \sec (c+d x)} \tan (c+d x) \, dx &=\frac {\text {Subst}\left (\int \frac {\sqrt {a+x}}{x} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {2 \sqrt {a+b \sec (c+d x)}}{d}+\frac {a \text {Subst}\left (\int \frac {1}{x \sqrt {a+x}} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {2 \sqrt {a+b \sec (c+d x)}}{d}+\frac {(2 a) \text {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+b \sec (c+d x)}\right )}{d}\\ &=-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {2 \sqrt {a+b \sec (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(137\) vs. \(2(51)=102\).
time = 0.25, size = 137, normalized size = 2.69 \begin {gather*} \frac {\left (2 \sqrt {b+a \cos (c+d x)}+\sqrt {a \cos (c+d x)} \log \left (1-\frac {\sqrt {b+a \cos (c+d x)}}{\sqrt {a \cos (c+d x)}}\right )-\sqrt {a \cos (c+d x)} \log \left (1+\frac {\sqrt {b+a \cos (c+d x)}}{\sqrt {a \cos (c+d x)}}\right )\right ) \sqrt {a+b \sec (c+d x)}}{d \sqrt {b+a \cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 42, normalized size = 0.82
method | result | size |
derivativedivides | \(\frac {2 \sqrt {a +b \sec \left (d x +c \right )}-2 \sqrt {a}\, \arctanh \left (\frac {\sqrt {a +b \sec \left (d x +c \right )}}{\sqrt {a}}\right )}{d}\) | \(42\) |
default | \(\frac {2 \sqrt {a +b \sec \left (d x +c \right )}-2 \sqrt {a}\, \arctanh \left (\frac {\sqrt {a +b \sec \left (d x +c \right )}}{\sqrt {a}}\right )}{d}\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 67, normalized size = 1.31 \begin {gather*} \frac {\sqrt {a} \log \left (\frac {\sqrt {a + \frac {b}{\cos \left (d x + c\right )}} - \sqrt {a}}{\sqrt {a + \frac {b}{\cos \left (d x + c\right )}} + \sqrt {a}}\right ) + 2 \, \sqrt {a + \frac {b}{\cos \left (d x + c\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.57, size = 192, normalized size = 3.76 \begin {gather*} \left [\frac {\sqrt {a} \log \left (-8 \, a^{2} \cos \left (d x + c\right )^{2} - 8 \, a b \cos \left (d x + c\right ) - b^{2} + 4 \, {\left (2 \, a \cos \left (d x + c\right )^{2} + b \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}\right ) + 4 \, \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}}{2 \, d}, \frac {\sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, a \cos \left (d x + c\right ) + b}\right ) + 2 \, \sqrt {\frac {a \cos \left (d x + c\right ) + b}{\cos \left (d x + c\right )}}}{d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sec {\left (c + d x \right )}} \tan {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 185 vs.
\(2 (43) = 86\).
time = 0.58, size = 185, normalized size = 3.63 \begin {gather*} \frac {2 \, {\left (\frac {a \arctan \left (-\frac {\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} + \sqrt {a - b}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {2 \, b}{\sqrt {a - b} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b} - \sqrt {a - b}}\right )} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.86, size = 47, normalized size = 0.92 \begin {gather*} \frac {2\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}}{d}-\frac {2\,\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}}{\sqrt {a}}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________